]> dgit.raspbian.org Git - gnome-shell.git/commit
screenshot: Blocklist the current screencast pipeline if recorder failed
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 19 Oct 2023 14:09:00 +0000 (16:09 +0200)
committerJonas Dreßler <verdre@v0yd.nl>
Sun, 11 Feb 2024 11:34:54 +0000 (12:34 +0100)
commitb6bfe0713747b84b6bf21cf558455841b7fa0a28
treeb1d3e8411a0dd5ab58d0ed329b8dc98a751c1366
parentce613f5d15ab9804e1b7710a7c4cb742a9f6d985
screenshot: Blocklist the current screencast pipeline if recorder failed

When gstreamer crashes during recording, it pulls the whole screencastService
down with it.

These crashes are typically caused by the gstreamer pipeline that's in use,
so to avoid running into them again and again, we can blocklist the last
used pipeline in case the recorder didn't shut down (aka crashed) last time.

To store this state, create a file (gnome-shell-screencast-pipeline-blocklist)
in the XDG runtime dir and store the ID of the current pipeline in that file
before we try to start.

Now when we crash while running the pipeline, the entry in that file will stay
around and we'll pick it up on the next start of the screencastService as a
blocklist.

When the recording was successful on the other hand, we'll call
`this._updateServiceCrashBlocklist([...this._blocklistFromPreviousCrashes])`
and remove the new entry from the file again before shutting down the recorder.

In addition to that, we can now encourage the user to try recording again
after a crash happened. Adjust the failure notification a bit to say
"please try again".

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6747

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2976>
js/dbusServices/screencast/screencastService.js
js/ui/screenshot.js